package com.ydc;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;


@SpringBootApplication
@MapperScan("com.ydc.mapper")
public class YdcSpringBootRun {
        public static void main(String[] args) {
            ConfigurableApplicationContext context =SpringApplication.run(YdcSpringBootRun.class,args);
            Environment environment = context.getBean(Environment.class);
            String port = environment.getProperty("server.port");
            String path = environment.getProperty("server.servlet.context-path");

            System.out.println("启动成功，访问链接：\nhttp://localhost:"+port+path);
            System.out.println("Swagger：\nhttp://localhost:"+port+path+"/swagger-ui.html");

    }
}
